<?php /* Smarty version 2.6.21, created on 2009-07-21 18:46:15
         compiled from products_list.tpl */ ?>
<h1>Список продуктов</h1>
<div style="width: 260">
<?php if ($this->_tpl_vars['Products']->hasPaginate()): ?>
		<div id="products_paging_bottom" class="paging">
			<?php echo $this->_tpl_vars['Products']->showPager(); ?>

			<?php echo '
				<script>
				    new Pager("products_paging_top");
				</script>
			'; ?>

		</div>
	<?php endif; ?><br>
	<div class="table_body">
		<table class="text">
			<tr>
				<th>Изображение</th>
                <th>Название</th>
                <th>Цена (за 100г)</th>
                <th>Страна производитель</th>
                <th>Артикул</th>
				<th>&nbsp;</th>
			</tr>
			<?php $_from = $this->_tpl_vars['Products']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['Product']):
?>
			<tr>
				<td class="mixed"><?php if ($this->_tpl_vars['Product']->image): ?><img alt="<?php echo $this->_tpl_vars['Product']->title; ?>
" src="<?php echo $this->_tpl_vars['Product']->getImageDir(true); ?>
<?php echo $this->_tpl_vars['Product']->getImageName('image','thumb'); ?>
"><?php endif; ?></td>
                <td class="mixed"><?php echo $this->_tpl_vars['Product']->title; ?>
</td>
                <td class="mixed"><?php echo $this->_tpl_vars['Product']->price; ?>
руб.</td>
                <td class="mixed"><?php echo $this->_tpl_vars['Product']->country; ?>
</td>
                <td class="mixed"><?php echo $this->_tpl_vars['Product']->artikul; ?>
</td>
			    <td>
			        <A href="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
products/edit/?id=<?php echo $this->_tpl_vars['Product']->getPk(); ?>
" onclick="go('<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
products/edit/?id=<?php echo $this->_tpl_vars['Product']->getPk(); ?>
'); return false;">
			        	<img src="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
img/edit_icon.png" title="редактировать" width="16" height="16">
			        </a>
			        <a href="javascript: void(0);" onclick="if (confirm('Вы действительно желаете удалить продукт?')) go('<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
products/delete/?id=<?php echo $this->_tpl_vars['Product']->getPk(); ?>
'); return false;">
			        	<img src="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
img/delete_icon.png" title="удалить" width="16" height="16">
			        </a>
		       </td>
			</tr>
			<?php endforeach; endif; unset($_from); ?>
		</table>
	</div>
	<?php if ($this->_tpl_vars['Products']->hasPaginate()): ?>
		<div id="products_paging_bottom" class="paging">
			<?php echo $this->_tpl_vars['Products']->showPager(); ?>

			<?php echo '
				<script>
				    new Pager("products_paging_bottom");
				</script>
			'; ?>

		</div>
	<?php endif; ?>
	<div class="operation">
	    <a href="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
products/edit/" onclick="go('<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
products/edit/'); return false;" class="add">добавить</a>
	    <div style="clear: both;"></div>
	</div>
</div>